import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    // userInfo:{}
    token: '',
    order_info:{},//订单详情
    address:{},//选择的地址
    ios:false
  },
  mutations: {
   //    getuserInfo(state,value){
		 //  state.userInfo = value,
		 //  localStorage.setItem(key, JSON.stringify(value))
    // }
    SAVE_TOKEN(state,data){
      state.token = data
    },
    SAVE_ORDER(state,data){
      state.order_info = data
    },
    SAVE_ADDRESS(state,data){
      state.order_info.address = data
    },
    SAVE_IOS(state,data){
      state.ios = data;
    }
  },
  actions: {
  },
  modules: {
  }
})
